package com.chexiehui.jc.entity;

import com.chexiehui.jc.R;

import java.io.Serializable;
import java.util.List;

/**
 * 词典
 */
public class DictInfo implements Serializable {
    private String Key;// (string, optional): 键 ,
    private String Value;// (string, optional): 值

    private List<DictInfo> childList;

    public DictInfo() {
    }

    public DictInfo(String key, String value) {
        Key = key;
        Value = value;
    }

    public String getKey() {
        return Key == null ? "" : Key;
    }

    public void setKey(String key) {
        Key = key;
    }

    public String getValue() {
        return Value == null ? "" : Value;
    }

    public void setValue(String value) {
        Value = value;
    }

    public int getIcon() {
        if(Value == null){
            return R.mipmap.ic_car_jc;
        }
        switch (Value){
            case "桥车":
                return R.mipmap.ic_car_jc;
            case "SUV":
                return R.mipmap.ic_car_suv;
            case "MPV":
                return R.mipmap.ic_car_mpv;
            case "跑车":
                return R.mipmap.ic_car_pc;
            case "皮卡":
                return R.mipmap.ic_car_pk;
            case "微面":
                return R.mipmap.ic_car_wm;
            case "微卡":
                return R.mipmap.ic_car_wk;
            case "轻车":
                return R.mipmap.ic_car_qc;
            default:
                return R.mipmap.ic_car_jc;
        }
    }

    public List<DictInfo> getChildList() {
        return childList;
    }

    public void setChildList(List<DictInfo> childList) {
        this.childList = childList;
    }
}
